<template>
  <div class="classify-title">
    <div class="title">
      <p>{{ props.leftText }}</p>
      <p v-if="rightText" class="right-text">
        {{ props.rightText }}
        <svg class="pick-icon right-open" aria-hidden="true">
          <use xlink:href="#icon-icon_select_up"></use>
        </svg>
      </p>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ClassifyTitle'
};
</script>
<script setup>
import { defineProps, defineEmits } from 'vue';
const props = defineProps({
  leftText: {
    type: String,
    default: '默认标题'
  },
  rightText: {
    type: [String, Boolean],
    default: false
  }
});
const emit = defineEmits([]);
</script>

<style lang="less" scoped>
.classify-title {
  width: 100%;
  min-height: 34px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  > .title {
    margin: 6px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(0, 0, 0, 0.6);
    font-size: 14px;
    font-family: Source Han Sans CN, Source Han Sans CN-Regular;
    font-weight: 400;
    .right-text {
      cursor: pointer;
      font-size: 12px;
      color: rgba(0, 0, 0, 0.4);
      > .right-open {
        transform: rotate(90deg);
      }
    }
  }
}
</style>
